/* ========== 全局重置 和 变量 ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
:root {
    --bg-dark: #0a0e27;
    --glass-bg: rgba(16, 22, 58, 0.45);
    --glass-border: rgba(255, 255, 255, 0.15);
    --primary: #00d4ff;
    --secondary: #ff0050;
    --accent-purple: #9d4edd;
    --accent-pink: #fb5607;
    --accent-yellow: #ffbe0b;
    --accent-green: #3a86ff;
    --text-light: #ffffff;
    --text-gray: #8892b0;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    /* 动画相关变量 */
    --animation-delay: 0ms;
    --animation-duration: 800ms;
    --animation-distance: 30px;
    /* 炫彩渐变 */
    --gradient-1: linear-gradient(45deg, var(--primary), var(--secondary));
    --gradient-2: linear-gradient(45deg, var(--accent-purple), var(--accent-pink));
    --gradient-3: linear-gradient(45deg, var(--accent-yellow), var(--accent-pink));
    --gradient-4: linear-gradient(45deg, var(--accent-green), var(--primary));
}

/* ========== 整体背景 ========== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark) url('../image/bj.JPG') center/cover fixed;
    color: var(--text-light);
    min-height: 100vh;
    position: relative;
    letter-spacing: 0.5px;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.7) 0%, rgba(26, 31, 58, 0.6) 100%);
    z-index: -1;
}

/* ========== 导航栏 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    padding: 0 50px;
    background: linear-gradient(135deg, rgba(16, 22, 58, 0.7), rgba(26, 31, 58, 0.9));
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.logo {
    font-size: 28px;
    font-weight: bold;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    letter-spacing: 0;
}
.home-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}
.home-link:hover {
    color: var(--primary);
    transform: scale(1.05);
}
.nav-menu {
    display: flex;
    justify-content: space-between;
    width: 400px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-menu li {
    flex: 1;
    text-align: center;
}
.nav-menu a {
    color: var(--text-light);
    font-size: 16px;
    font-weight: 600;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    position: relative;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.nav-menu a:hover {
    color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}
.nav-menu a.active {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}
.nav-menu a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.3s ease, left 0.3s ease;
}
.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 80%;
    left: 10%;
}
.nav-menu a:active {
    transform: translateY(0);
}

/* 实时时间显示样式 */
.time-display {
    font-size: 20px;
    font-weight: bold;
    color: #ffd700;
    margin-right: 20px;
    padding: 8px 16px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

#fullscreenBtn {
    margin-left: auto;
}

/* ========== 主容器 ========== */
.main-container {
    max-width: 1400px;
    margin: 100px auto 30px;
    padding: 0 20px;
}

/* ========== 实时指标栏 ========== */
.realtime-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 40px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

/* ========== 词云容器样式 ========== */
#hotspotWords {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
}

/* ========== 实时热点词云（新增id="hotspot"） */
.hotspot-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.hotspot-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
    white-space: nowrap;
    animation: flowAnimation 30s linear infinite;
}

.hotspot-wrapper.paused {
    animation-play-state: paused;
}

.hotspot-item {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-light);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hotspot-item:hover {
    transform: scale(1.2);
    z-index: 100;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

/* 流动动画 */
@keyframes flowAnimation {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 热点详情弹窗 */
.hotspot-detail {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    z-index: 1000;
    min-width: 300px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.hotspot-detail h3 {
    margin-bottom: 16px;
    color: var(--primary);
    font-size: 20px;
}

.hotspot-detail .detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.hotspot-detail .detail-label {
    color: var(--text-gray);
}

.hotspot-detail .detail-value {
    color: var(--text-light);
    font-weight: 500;
}

.hotspot-detail .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.hotspot-detail .close-btn:hover {
    color: var(--text-light);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ========== 热点词流动样式 ========== */
.hotspot-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    padding: 20px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}

/* 流动动画应该应用在wrapper上，而不是直接应用在容器上 */
.hotspot-container.flowing > * {
    animation: flowWords 30s linear infinite;
}

.hotspot-container.paused > * {
    animation-play-state: paused;
}

@keyframes flowWords {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.hotspot-item {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.hotspot-item:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
    z-index: 100;
}

/* 热点详情弹窗 */
.hotspot-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(16, 22, 58, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px;
    min-width: 250px;
    max-width: 300px;
    word-break: break-word;
    white-space: normal;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hotspot-item:hover .hotspot-tooltip {
    opacity: 1;
    visibility: visible;
}

.hotspot-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(16, 22, 58, 0.95);
}

.hotspot-tooltip h4 {
    margin: 0 0 12px 0;
    color: #00d4ff;
    font-size: 16px;
}

.hotspot-tooltip p {
    margin: 6px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: space-between;
}

.hotspot-tooltip .label {
    color: rgba(255, 255, 255, 0.6);
}

.hotspot-tooltip .value {
    color: #fff;
    font-weight: bold;
}
.realtime-item {
    text-align: center;
}
.realtime-item .label {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 6px;
}
.realtime-item .value {
    font-size: 32px;
    font-weight: bold;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
    animation: pulseText 2s ease-in-out infinite alternate;
}
.realtime-item .unit {
    font-size: 14px;
    color: var(--text-gray);
    margin-left: 4px;
}

/* ========== 网格卡片 ========== */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 图表行容器 */
.chart-row {
    display: flex;
    gap: 24px;
    width: 100%;
}

/* 三分之二宽度 */
.two-thirds {
    flex: 2;
    grid-column: auto !important;
}

/* 三分之一宽度 */
.one-third {
    flex: 1;
}

/* 地图卡片及其右侧卡片的高度设置 */
.map-container,
.map-container + .card {
    height: 400px;
    display: flex;
    flex-direction: column;
}
.card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    transition: transform .3s, box-shadow .3s;
    box-shadow: var(--shadow);
    /* 初始状态：隐藏和下移 */
    opacity: 0;
    transform: translateY(var(--animation-distance));
}

/* 淡入动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(var(--animation-distance));
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 字体发光动画 */
@keyframes glow {
    from {
        text-shadow: 0 0 10px rgba(251, 86, 7, 0.4), 0 0 20px rgba(251, 86, 7, 0.3);
    }
    to {
        text-shadow: 0 0 15px rgba(251, 86, 7, 0.6), 0 0 30px rgba(251, 86, 7, 0.4), 0 0 40px rgba(255, 190, 11, 0.3);
    }
}

/* 字体脉动动画 */
@keyframes pulseText {
    from {
        background-position: 0% 50%;
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
    }
    to {
        background-position: 100% 50%;
        text-shadow: 0 0 15px rgba(255, 0, 80, 0.4);
    }
}

/* 应用动画类 */
.animate-in {
    animation: fadeInUp var(--animation-duration) ease forwards;
    animation-delay: var(--animation-delay);
}

/* 实时指标卡片动画 */
.realtime-bar .realtime-item {
    opacity: 0;
    transform: translateY(var(--animation-distance));
}

/* 用户数据页面统计卡片动画 */
.dashboard-header .stat-card {
    opacity: 0;
    transform: translateY(var(--animation-distance));
}

/* 为顶部元素设置更快的动画速度 */
.realtime-bar .realtime-item,
.dashboard-header .stat-card {
    --animation-duration: 600ms; /* 顶部元素动画更快 */
}

/* 为每一行的卡片添加递增延迟 - 优化滚动加载体验 */
.dashboard-grid > .card:nth-child(1),
.dashboard-content > .card:nth-child(1),
.realtime-bar > .realtime-item:nth-child(1),
.dashboard-header > .stat-card:nth-child(1) {
    --animation-delay: 0ms; /* 第一个元素无延迟 */
}

.dashboard-grid > .card:nth-child(2),
.dashboard-content > .card:nth-child(2),
.realtime-bar > .realtime-item:nth-child(2),
.dashboard-header > .stat-card:nth-child(2) {
    --animation-delay: 100ms;
}

.dashboard-grid > .card:nth-child(3),
.dashboard-content > .card:nth-child(3),
.realtime-bar > .realtime-item:nth-child(3),
.dashboard-header > .stat-card:nth-child(3) {
    --animation-delay: 200ms;
}

.dashboard-grid > .card:nth-child(4),
.dashboard-content > .card:nth-child(4),
.realtime-bar > .realtime-item:nth-child(4),
.dashboard-header > .stat-card:nth-child(4) {
    --animation-delay: 300ms;
}

.dashboard-grid > .card:nth-child(5),
.dashboard-content > .card:nth-child(5),
.realtime-bar > .realtime-item:nth-child(5) {
    --animation-delay: 400ms;
}

.dashboard-grid > .card:nth-child(6),
.dashboard-content > .card:nth-child(6) {
    --animation-delay: 500ms;
}

/* 动画相关样式保持不变，不修改卡片布局 */

/* 对于chart-row中的卡片，使用交错延迟策略，增强滚动加载感 */
.chart-row > .card:nth-child(1) {
    --animation-delay: 0ms;
}

.chart-row > .card:nth-child(2) {
    --animation-delay: 150ms;
}

/* 对于第二行的chart-row，使用更长的初始延迟，确保与上一行有视觉间隔 */
.chart-row:nth-child(2) > .card:nth-child(1) {
    --animation-delay: 0ms;
}

.chart-row:nth-child(2) > .card:nth-child(2) {
    --animation-delay: 150ms;
}

/* 添加卡片加载后的微调效果，增强"实时加载"的感觉 */
.card.animate-in {
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* 只保留动画完成后的性能优化，不修改hover效果 */
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.25);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.card-title {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(157, 78, 221, 0.3);
    position: relative;
    display: inline-block;
    letter-spacing: 0.5px;
}
.card-subtitle {
    font-size: 14px;
    color: var(--text-gray);
    margin-top: 4px;
}

/* ========== 图表容器（固定高度） ========== */
.chart-container {
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.map-container {
    grid-column: span 2;
    height: 400px;
    display: flex;
    flex-direction: column;
}

/* 确保地图canvas在容器中居中显示 */
.map-container canvas,
.chart-container canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
}

/* ========== 词云 ========== */
.hotspot-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    padding: 20px;
    height: 200px;
    overflow: hidden;
    position: relative;
}
.hotspot-item {
    background: linear-gradient(45deg, var(--secondary), #ff4081);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    animation: pulse 2s infinite;
    cursor: pointer;
    transition: transform .2s;
}
.hotspot-item:hover {
    transform: scale(1.1);
}
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ========== 表格 ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.data-table th {
    background: rgba(0, 212, 255, 0.15);
    background: var(--gradient-4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(58, 134, 255, 0.3);
}
.data-table tr:hover {
    background: rgba(0, 212, 255, 0.08);
}

/* ========== 进度条 ========== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width .5s;
}

/* ========== 按钮 ========== */
.btn {
    background: linear-gradient(45deg, var(--primary), #0099cc);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

/* ========== 用户头像 & 徽章 ========== */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}
.level-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
}

/* ========== 订单滚动 ========== */
.data-stream {
    /* 高度自适应，不再固定为100px */
    height: calc(100% - 60px); /* 减去标题区域的高度 */
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* 添加内发光效果 */
    box-shadow: 
        inset 0 0 10px rgba(0, 212, 255, 0.1),
        0 4px 15px rgba(0, 0, 0, 0.2);
}
.data-stream-item {
    /* 允许文本换行，确保内容完整显示 */
    white-space: normal;
    word-wrap: break-word;
    margin-bottom: 12px;
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(16, 22, 58, 0.6), rgba(26, 31, 58, 0.6));
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.5;
    /* 添加微妙的渐变背景 */
    background-size: 200% 200%;
}

.data-stream-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.15);
}

.data-stream-item:last-child {
    margin-bottom: 0;
}

.order-content {
    margin-bottom: 4px;
}

.order-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.emoji {
    font-size: 18px;
    margin-right: 8px;
    animation: bounceIn 0.6s ease-out;
}

.city {
    color: #4299e1;
    margin-right: 8px;
    font-weight: 600;
}

/* 为时间标签和分类标签添加样式 */
.time-tag {
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.8) 0%, rgba(13, 106, 177, 0.8) 100%);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin: 0 8px;
    color: white;
    font-weight: 500;
}

.category-tag {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.8) 0%, rgba(255, 87, 34, 0.8) 100%);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin: 0 8px;
    color: white;
    font-weight: 500;
}

.channel-tag {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.8) 0%, rgba(27, 94, 32, 0.8) 100%);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin: 0 8px;
    color: white;
    font-weight: 500;
    animation: pulse 2s infinite;
}

.product-name {
    color: #ffcc80;
    margin: 0 8px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.product-name:hover {
    text-shadow: 0 0 10px rgba(255, 204, 128, 0.8);
}

.price {
    font-size: 16px;
    font-weight: bold;
    margin-left: auto;
    transition: all 0.3s ease;
}

.text-high-value {
    color: #ef5350;
    text-shadow: 0 0 10px rgba(239, 83, 80, 0.6);
}

.text-medium-value {
    color: #ffa726;
    text-shadow: 0 0 10px rgba(255, 167, 38, 0.6);
}

.text-normal-value {
    color: #66bb6a;
    text-shadow: 0 0 10px rgba(102, 187, 106, 0.6);
}

.price:hover {
    transform: scale(1.1);
}

/* 新增动画定义 */
@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* 添加悬停效果 */
.data-stream-item:hover {
    transform: translateX(5px);
    border-color: rgba(0, 212, 255, 0.3);
    background-position: 100% 100%;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

/* 优化卡片布局结构，确保响应式设计 */
.dashboard-grid > .card:nth-child(2) {
    /* 确保卡片可以根据内容自适应高度 */
    min-height: 320px;
    max-height: 400px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 优化数据流容器滚动条样式 */
.data-stream::-webkit-scrollbar {
    width: 6px;
}

.data-stream::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.data-stream::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.4);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.data-stream::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.6);
}

.data-stream::-webkit-scrollbar-corner {
    background: transparent;
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

/* ========== 用户数据页面专用样式 ========== */
body.user-data-page {
    background: var(--bg-dark) url('../image/bj4.JPG') center/cover fixed;
}

/* 仪表板样式 */
.dashboard {
    max-width: 1400px;
    margin: 100px auto 30px;
    padding: 0 20px;
}

.dashboard-header {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.25);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.stat-change {
    font-size: 12px;
    font-weight: 500;
}

.stat-change.positive {
    color: #4caf50;
}

.stat-change.negative {
    color: #ff5252;
}

.stat-unit {
    font-size: 11px;
    opacity: 0.8;
}

.dashboard-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.dashboard-content .card {
    margin-bottom: 0;
}

.dashboard-content .card:nth-child(1),
.dashboard-content .card:nth-child(2) {
    grid-column: span 1;
}

.dashboard-content .card:nth-child(3),
.dashboard-content .card:nth-child(4) {
    grid-column: span 2;
}

.dashboard-content .card:nth-child(5),
.dashboard-content .card:nth-child(6) {
    grid-column: span 1;
}

/* 用户数据卡片内容 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-controls {
    display: flex;
    gap: 10px;
}

.form-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:hover,
.form-select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    outline: none;
}

.card-body {
    height: calc(100% - 60px);
}

/* 图表容器样式 - 替代内联样式 */
#regionDistributionChart,
#activeTrendChart {
    height: 400px;
}

#ageDistributionChart,
#genderDistributionChart {
    height: 250px;
}

#userGrowthChart,
#dwellTimeChart {
    height: 300px;
}

/* 图表类通用样式 */
.chart {
    width: 100%;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 行和列布局 */
.row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.row:last-child {
    margin-bottom: 0;
}

.col-6 {
    flex: 1;
}

.col-12 {
    width: 100%;
}

/* 用户标签样式 */
#interestTags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 用户列表样式 */
.user-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.user-item:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.user-info h4 {
    margin: 0 0 5px 0;
    color: #fff;
    font-size: 16px;
}

.user-info p {
    margin: 0;
    color: #8892b0;
    font-size: 13px;
}

.user-stats {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-level {
    padding: 2px 8px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 12px;
    font-size: 12px;
    color: #fff;
    margin-bottom: 5px;
}

.user-score {
    font-size: 14px;
    color: #8892b0;
}

/* 用户头像样式 */
.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #00d4ff;
    object-fit: cover;
    margin-right: 15px;
}

/* 用户标签样式 */
.user-tags {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
}

.user-tag {
    padding: 4px 12px;
    margin: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    font-size: 12px;
    color: #8892b0;
    transition: all 0.3s ease;
}

.user-tag:hover {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    transform: scale(1.05);
}

/* 进度条样式 */
.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #0099cc);
    border-radius: 3px;
    transition: width 1s ease;
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .dashboard-content .card:nth-child(1),
    .dashboard-content .card:nth-child(2),
    .dashboard-content .card:nth-child(3),
    .dashboard-content .card:nth-child(4),
    .dashboard-content .card:nth-child(5),
    .dashboard-content .card:nth-child(6) {
        grid-column: span 1;
    }
    
    .dashboard-header {
        flex-wrap: wrap;
    }
    
    .stat-card {
        min-width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }
    
    .nav-menu {
        display: none;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .map-container {
        grid-column: span 1;
        height: 300px;
    }
    
    .realtime-bar {
        flex-direction: column;
        gap: 20px;
    }
    
    .dashboard-header {
        flex-direction: column;
    }
    
    .stat-card {
        min-width: 100%;
    }
    
    .row {
        flex-direction: column;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-controls {
        width: 100%;
    }
    
    .form-select {
        width: 100%;
    }
}